<template>
	<view style="padding-top: 100rpx;">
		<view class="text-area">
			<text>输入值: </text><input type="text" v-model="title" style="color: red;" />
		</view>
		<view class="text-area">
			<text>回传值: </text><input type="text" :value="callBackValue" style="color: yellow;" />
		</view>
		<comA :intent="title"></comA>
		<comB @callBackFun="callBack"></comB>
	</view>
</template>

<script>
	import comA from '../../../components/compA.vue'
	import comB from '../../../components/compB.vue'
	export default {
		components:{
			comA,
			comB
		},
		data() {
			return {
				title: 'Hello', // 输入值的默认值
				callBackValue: '0595-2788888' // 回传值的默认值
			}
		},
		methods: {
			callBack(msg){
			  console.warn("---index---callBack-->" + msg);
			  this.callBackValue = msg;
			}
		}
	}
</script>


<style>
.text-area {
  margin: 20rpx;
}
/* 输入框样式 */
.text-area input{
  background-color: #cccccc;
  border: none;
  padding: 10rpx;
}
</style>
